<?php
/** $Id: default_form.php 11917 2009-05-29 19:37:05Z ian $ */
defined( '_JEXEC' ) or die( 'Restricted access' );
	$user = JFactory::getUser();
?>
 <div class="task-detail">
  <h2 class="task-title">ID. <?php echo $this->row->id;?> <?php echo $this->row->title;?></h2>
  <p style="margin-left:30px;">(Oprettet d. <?php echo JHtml::_('date', $this->row->created , JText::_('DATE_FORMAT_LC6')) ;?>, <?php if($this->row->usertype==1) { echo "Erhverv"; }  else { echo "Privat"; }?> Kunde)</p>
<div class="content-view">
    <p class="desc"><?php echo $this->row->description;?></p>
    <p class="kunde-info">
    	 Kunden estimerer prisen til at være: <?php echo $this->row_pris->title; ?>
        <br>
         Opgaven ønskes afsluttet: <?php echo JHtml::_('date', $this->row->deadline , JText::_('DATE_FORMAT_LC6')) ;?><br>
         Landsdel: <?php echo $this->land; ?>
    </p>
    <?php												
		$status = $user->guest;
		
		if($status == 1){
		//do user logged out stuff
		?>
		 <p class="kunde-info"><big>Du skal være logget på for at se kundens kontaktoplysninger.</big></p>
            <div class="link-btn">
                <a class="button fll" href="index.php?option=com_users">Log på</a>
                <a class="button fll" href="index.php?option=com_jobs">Tilmeld malerfirma</a>
            </div>
		<?php
		}
		else
		{
		//do user logged in stuff
		?>
        <p class="kunde-info">Kundens kontaktoplysninger:</p>
		 <div class="contact-info">
			<div class="left-col fll">
            	<?php if($this->row->usertype==1) { ?>
            	<p><span><?php echo $this->row->company;?></span> Firma navn:</p>
                <?php } ?>
				<p><span><?php echo $this->row->firstname;?> <?php echo $this->row->lastname;?></span> Navn:</p>
				<p><span><?php echo $this->row->address;?></span>Adresse: </p>
				<p><span><?php echo $this->row->postcode;?></span>Postnr.:</p>
				<p><span><?php echo $this->row->city;?></span> By:</p>
				<p><span><?php echo $this->land;?></span>Landsdel: </p>
				<p><span><?php echo $this->row->email;?></span>Email: </p>
				<p><span><?php echo $this->row->telephone;?></span>Tlf.: </p>
			</div>
			<div class="right-col fll">
		        <?php if($this->row->workataddress==0) { ?>
				<p>Arbejdet udføres på følgende adresse:</p>
				<p><span><?php echo $this->row->address1;?></span>Adresse: </p>
				<p><span><?php echo $this->row->postcode1;?></span>Postnr.:</p>
				<p><span><?php echo $this->row->city1 ;?></span> By:</p>
				<p><span><?php echo $this->land1;?></span>Landsdel: </p>
                <?php } ?>
                 <?php
					$file01 = $this->row->fileurl1;
					$file02 = $this->row->fileurl2;
					$file03 = $this->row->fileurl3;
			
			
				if(strlen($file01) > 0) {
					$lfile01 = '<a target="_blank" href="'.JURI::root().$file01.'">'.$file01.'</a>';
					
				} else {
					$lfile01 = '';
				}
				if(strlen($file02) > 0) {
					$lfile02 = '<a target="_blank"  href="'.JURI::root().$file02.'">'.$file02.'</a>';
					
				} else {
					$lfile02 = '';
				}
				if(strlen($file03) > 0) {
					$lfile03 = '<a target="_blank"  href="'.JURI::root().$file03.'">'.$file03.'</a>';
				
				} else {
					$lfile03 = '';
				}
				
            ?>
            <p><span><?php echo $lfile01;?></span>Billeder: </p>
            <p><span><?php echo $lfile02;?></span> </p>
            <p><span><?php echo $lfile03;?></span> </p>
			 </div>
            
		</div>
       
        <div class="print">
        <a  class="button print-btn" href="javascript:if(window.print)window.print()"><span>Udskriv</span></a>
    	</div>
		<?php
		} 
	?>
   
    
    
 </div>
  </div>